package com.ibm.productivity.tools.blogplugin.impl;

import com.ibm.productivity.tools.blogplugin.meta.IBlog;
import com.ibm.productivity.tools.blogplugin.meta.IBlogAccount;

public class MyMockBlogAccount implements IBlogAccount {

	IBlog [] blogs;
	{
		blogs = new MyMockBlog[2];
		blogs[0] = new MyMockBlog("My first blog");
		blogs[1] = new MyMockBlog("My second blog");
	}
	
	public IBlog getBlog(int index) {
		if (index <0 || index>1) return null;
		return blogs[index];
	}

	public int getBlogCount() {
		return 2;
	}

	public boolean login(String username, String password) {
		if (password.compareTo("1") == 0)
			return true;
		return false;
	}

	public boolean logout() {

		return true;
	}

}
